How Quantum Key Distribution Works